package com.pcbly.web.business.workflow;

import java.util.List;

import com.pcbly.web.bean.workflow.WorkflowStepBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.persistence.workflow.WorkflowStepDao;

public class WorkflowStepServiceImp extends BaseServiceImp<WorkflowStepBean>
		implements WorkflowStepService {

	public WorkflowStepServiceImp() {
		super();
	}

	private WorkflowStepDao workflowStepDao;

	public void setWorkflowStepDao(WorkflowStepDao workflowStepDao) {
		this.workflowStepDao = workflowStepDao;
	}

	@Override
	public void createWorkflowStepBean(WorkflowStepBean bean) throws Exception {
		// TODO Auto-generated method stub
		workflowStepDao.createWorkflowStepBean(bean);
	}

	@Override
	public void deleteWorkflowStepBean(String id) throws Exception {
		// TODO Auto-generated method stub
		workflowStepDao.removeById(id);
	}

	@Override
	public WorkflowStepBean findById(String id) throws Exception {
		// TODO Auto-generated method stub
		return workflowStepDao.get(id);
	}

	@Override
	public List<WorkflowStepBean> findWorkflowStepBeanByTIdAndIndex(
			String templateId, String index, boolean equal) throws Exception {
		// TODO Auto-generated method stub
		return workflowStepDao.findWorkflowStepBeanByTIdAndIndex(templateId, index, equal);
	}

	@Override
	public WorkflowStepBean findWorkflowStepBeanByTempIdAndStepName(
			String templateId, String name) throws Exception {
		// TODO Auto-generated method stub
		return workflowStepDao.findWorkflowStepBeanByTempIdAndStepName(templateId, name);
	}

	@Override
	public void updateWorkflowStepBean(WorkflowStepBean bean) throws Exception {
		// TODO Auto-generated method stub
		workflowStepDao.saveObject(bean);
	}

	@Override
	public List<WorkflowStepBean> findWorkflowStepBeanByTemplateId(
			String templateId) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}
}
